var util = require("../../utils/util.js")
var app = getApp()
Page({
  data: {
    data1time: 10, //每次读几条
    events: [],
    readdatatime: 0, //已经读了几次  
    tabarr: ["关注", "发现", "热榜"],
    TabCur: 2,
    scrollLeft: 0,
    page: 0,
    allevents:[]
  },

  GotoSearch: function(e) {
    wx.navigateTo({
      url: '../search/search',
    })
  },

  onLoad: function(options) {
    wx.setNavigationBarTitle({
      title: '发现',
    })
    console.log(util.formatTime(new Date()))
    //发现块的记录
    //一开始先读10条记录
    var that = this
    that.setData({
      events: [{
        profile:"这就是街舞",
        fmttimefrom:"2021-05-01",
        place:"体育场"
      }],
      allevents:"456"
    })
    that.setData({
      hotevents: "123"
    })
  },

  tabSelect(e) {
    this.setData({
      TabCur: e.currentTarget.dataset.id,
      scrollLeft: (e.currentTarget.dataset.id - 1) * 60
    })
  },

  GotoSeatch: function(e) {
    console.log("点击搜索框，接下来跳转到搜索页面")
  },


  Gotoeventdetail: function(event) {
    wx.navigateTo({
      url: '/pages/eventdetail/eventdetail',
    })
  },

  onReachBottom: function() {
    var that = this
    that.setData({
      events: [{
        profile:"这就是街舞",
        fmttimefrom:"2021-05-01",
        place:"体育场"
      }],
      allevents:"123",
      page: "456"
    })
  }
})